package com.itheima.test05;

public class Test02 {

    public static void main(String[] args) {

        int[] arr= {10,8,9,5,6,7,1,3,4,2};

        int  num=11;
        int index=-1;
        for (int i = 0; i < arr.length; i++) {
            //arr[i]
            if(arr[i]==num){
               index=i;
               break;
            }
        }
        //最小 1次  最大 长度次
        System.out.println(index);
    }
}
